<%@ page language="java" import="pandora.dto.*,pandora.bo.login.*,java.util.*" %>
<%@ page import="pandora.bo.JMPG.*" %>
<%@ page import="pandora.dto.*" %>
<%@ page import="java.util.*" %>
<%@ page import="pandora.bo.login.*" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<title> LISTADO DE TIENDAS</title>
<link rel="stylesheet" type="text/css" href="style/style.css" />
</head>
<body>
<div id="main"><jsp:include page="/head.jsp" />


<div id="wrapper">

<div id="main_body">

<p>
	SELECCIONE UNA TIENDA PARA ACCEDER AL DETALLE
</p>

<p>
	<% 
		session = request.getSession();
		out.write("Usuario Logado: " + (String)session.getAttribute("session.user"));
	%>
</p>
<br><br>

	<% 
		IStoreModule storeModulo = new StoreModule();
	
		List<StoreDTO> stores;
		
		stores = storeModulo.getListStore();
		
		int i = 1;
		for(StoreDTO s: stores){
			out.write("<a href='FrontController?res=JSP/JSP_JMPG/detalle_tienda.jsp?nif="+ s.getStoreNIF() +"'>" + i + " - " + s.getStoreName() + " (" + s.getStoreNIF() + ")</a><br>");
			i++;
		}
  		
  	%>


	<br><br><a <%	DBLogin dbl = new DBLogin();
					if(dbl.verifyCustomer((String)session.getAttribute("session.user"))){
				%>href="FrontController?res=menuCustomer.jsp"
				<%	}
					if(dbl.verifyStore((String)session.getAttribute("session.user"))){
					%>href="FrontController?res=menuStore.jsp"
				<%	}
				%>>VOLVER</a>

</div>

</div>

<jsp:include page="/foot.jsp" /></div>
</body>

</html>